<template>
	<view class="mainpadding">
		<view class="sanshier xiaohei fonweight">原因</view>
		<textarea class="textarea margin_top2" name="" id="" placeholder="请说明原因" v-model="qjyy"></textarea>
		<view class="mainpadding gudingdb ">
			<view class="bigbtn" @click="submit">提交</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				listid: "",
				qjyy: ""
			}
		},
		onLoad(options) {
			this.listid = options.id
		},
		methods: {
			submit(id) {
				if(this.qjyy==""){
					httpRequest.toast("请输入请假原因")
					return false
				}
				httpRequest.request("/api/user/kcKcbUserQj", 'GET', {
					id:this.listid,
					qjyy:this.qjyy
				}, false, false, true).then(res => {
					httpRequest.toast(res.msg)
					if (res.code == 1) {
						setTimeout(()=>{
							uni.navigateBack(1)
						},1000)
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background: #F9F9F9;
	}

	.textarea {
		padding: 30rpx;
		width: 100%;
		height: 200rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		box-sizing: border-box;
	}
</style>